// readers/reader.go
package readers

import (
	"context"
	"database/sql"
	"mig2kwdb/common"
)

type Reader interface {
	GetDataBases() ([]string, error)
	GetDatabaseTables(databaseName, schemaName string) ([]string, error)
	GetTableDefinition(databaseName, schemaName, tableName string) (common.TableDefinition, error)
	GetTableColumn(databaseName, schemaName, tableName string) ([]common.KwdbColumn, error)
	GetConditionRows(databaseName, schemaName, tableName string, columns []common.KwdbColumn, condition string) (common.RowsInterface, error)
	GetDB() *sql.DB
	Close()
	GetDataBaseType() string
	IsNetworkError(err error) bool
	GetStartPos() (common.ReplicateStartPos, error)
	StartReplicate(ctx context.Context, startPos common.ReplicateStartPos) error
	SetDataBases(dataBases []common.DatabaseConfig)
	SetReplicateHandler(handler common.ReplicateHandlerInterface)
}
